package org.cypress.rtpack.controller;

import org.cypress.rtpack.common.core.Result;
import org.cypress.rtpack.entity.RtpackModel;
import org.cypress.rtpack.service.IRtpackModelService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/model")
public class RtpackModelController {

    @Autowired
    private IRtpackModelService rtpackModelService;

    private static final Logger logger = LoggerFactory.getLogger(RtpackModelController.class);

    @GetMapping("/list")
    public Result<RtpackModel> getList() {
        List<RtpackModel> list = rtpackModelService.getAll();
        return Result.dataOf(list);
    }
}
